using System.ComponentModel;
using System.Diagnostics.Contracts;

namespace YaTools.Yaml.AbstractContracts
{
    [DesignTimeVisible(false)]
    [ContractClassFor(typeof(Dump.Decorator))]
    internal abstract class DecoratorContract : Dump.Decorator
    {
        public override bool PresentNode(Dump dump, object value)
        {
            Contract.Requires(dump != null);
            Contract.Requires(value != null);
            return true;
        }

        public override void Preprocess(Dump dump, object value)
        {
            Contract.Requires(dump != null);
            Contract.Requires(value != null);
        }

        public override string HandleForTag(string tag)
        {
            Contract.Requires(tag != null);
            Contract.Ensures(Contract.Result<string>() != null);
            return tag;
        }
    }
}